import type { MaybeRefOrGetter } from 'vue'

export default function useHotUnmount(hot: MaybeRefOrGetter) {
  onUnmounted(() => {
    toValue(hot).destroy()
  })
}
